package org.jeecg.modules.rooms.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.modules.business.entity.BusHousePriceSchemeLayout;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List;

/**
 * <p>
 * 房价方案
 * </p>
 *
 * @author Claude
 * @since 2023-03-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ces_house_price_scheme")
public class CesHousePriceScheme extends Model<CesHousePriceScheme> {

    private static final long serialVersionUID = 1L;

    private String id;

    /**
     * 酒店ID
     */
    private String hotelId;

    /**
     * 房价方案
     */
    private String priceScheme;

    /**
     * 简码
     */
    private String simpleCode;

    /**
     * 编号
     */
    private String number;

    /**
     * 客人来源
     */
//    private String guestSource;

    /**
     * 客人类型
     */
    private Integer guestType;

    /**
     * 关联会员
     */
    private String martketMemberId;

    /**
     * 关联协议单位
     */
    private String agreementUnitId;

    /**
     * 联系人
     */
    private String mediation;

    /**
     * 入住时间(0代表无限制，1代表时间段)
     */
    private Integer checkInTime;

    /**
     * 入住开始时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "HH:mm")
    @DateTimeFormat(pattern="HH:mm")
    private LocalTime startTime;

    /**
     * 入住结束时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "HH:mm")
    @DateTimeFormat(pattern="HH:mm")
    private LocalTime endTime;

    /**
     * 周末假日（1代表星期一，2代表星期二直到星期日以此类推）
     */
    private String weekend;

    /**
     * 节假日（选择一个或多个时间）
     */
    private String holiday;

    /**
     * 有效期（0代表无限制，1代表时间段）
     */
    private Integer validTime;

    /**
     * 有效期开始时间
     */
    private LocalDateTime validStartTime;

    /**
     * 有效期结束时间
     */
    private LocalDateTime validEndTime;

    /**
     * 是否开启（1代表开启，0代表关闭）
     */
    private Integer open;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 类型 1 周末 2节假日 3 特殊
     */
    private Integer schemeType;

    /**
     * 创建时间
     */
    @TableField("createAt")
    private LocalDateTime createAt;

    /**
     * 修改时间
     */
    @TableField("updateAt")
    private LocalDateTime updateAt;

    /**
     * 逻辑删除字段
     */
    private Boolean invalid;
    /**
     * 逻辑删除字段
     */
    @TableField(exist = false)
    private List<BusHousePriceSchemeLayout> schemeLayouts;


    public static final String ID = "id";

    public static final String HOTEL_ID = "hotel_id";

    public static final String PRICE_SCHEME = "price_scheme";

    public static final String SIMPLE_CODE = "simple_code";

    public static final String NUMBER = "number";

    public static final String GUEST_SOURCE = "guest_source";

    public static final String GUEST_TYPE = "guest_type";

    public static final String MARTKET_MEMBER_ID = "martket_member_id";

    public static final String AGREEMENT_UNIT_ID = "agreement_unit_id";

    public static final String MEDIATION = "mediation";

    public static final String CHECK_IN_TIME = "check_in_time";

    public static final String START_TIME = "start_time";

    public static final String END_TIME = "end_time";

    public static final String WEEKEND = "weekend";

    public static final String HOLIDAY = "holiday";

    public static final String VALID_TIME = "valid_time";

    public static final String VALID_START_TIME = "valid_start_time";

    public static final String VALID_END_TIME = "valid_end_time";

    public static final String OPEN = "open";

    public static final String SORT = "sort";

    public static final String CREATEAT = "createAt";

    public static final String UPDATEAT = "updateAt";

    public static final String INVALID = "invalid";

    public static final String SCHEME_TYPE = "scheme_type";

    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
